package com.blkj.spring_boot_blkj.service;

import com.blkj.spring_boot_blkj.mapper.DemoUserDao;
import com.blkj.spring_boot_blkj.pojo.DemoUser;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class DemoUserService {

    @Autowired
    private DemoUserDao demoUserDao;

    public List<DemoUser> queryLimit(Integer currentPage, Integer pageSzie){
        return demoUserDao.queryLimit(currentPage,pageSzie);
    }

    public Integer addUser(DemoUser user){
        return demoUserDao.addUser(user);
    }

    public Integer updateUser(DemoUser user){
        return demoUserDao.updateUser(user);
    }

    public Integer deleteUser(DemoUser user){
        return demoUserDao.deleteUser(user);
    }
}

